<!DOCTYPE html><!DOCTYPE html><script>
  (function() {
    if(isMobile()) {
      location.replace("https://w.mail.qq.com");
    }
    function isMobile() {
      return navigator.userAgent.match(/Mobile|iPhone|iPad|Android/i) || Math.min(screen.height,screen.width) <= 480;
    }
  })();
</script><script>
  (function()
  {
    if(location.protocol=="http:")
    {
      document.cookie = "edition=; expires=-1; path=/; domain=.mail.qq.com";
      location.href="https://mail.qq.com";
    }
  })();
</script><html lang="zh-cmn"><head>
  <title>登录QQ邮箱</title>
  <meta name="renderer" content="webkit" /><meta name="save" content="history" /><meta http-equiv="Content-Type" content="text/html; charset=gb18030" /><meta name="description" content="QQ邮箱，为亿万用户提供高效稳定便捷的电子邮件服务。你可以在电脑网页、iOS/iPad客户端、及Android客户端上使用它，通过邮件发送3G的超大附件，体验文件中转站、日历、记事本、漂流瓶等特色功能。QQ邮箱，常联系。" /><link rel="stylesheet" type="text/css" href="https://rescdn.qqmail.com/zh_CN/htmledition/style/webp/loginpage4cf68c.css" /><link rel="icon" type="images/png" sizes="16*16" href="/zh_CN/htmledition/images/favicon/qqmail_favicon_16h.png"><link rel="icon" type="images/png" sizes="32*32" href="/zh_CN/htmledition/images/favicon/qqmail_favicon_32h.png"><link rel="icon" type="images/png" sizes="48*48" href="/zh_CN/htmledition/images/favicon/qqmail_favicon_48h.png"><link rel="icon" type="images/png" sizes="96*96" href="/zh_CN/htmledition/images/favicon/qqmail_favicon_96h.png"><meta name="theme-color" content="gray"></head><body><script type="text/javascript">
  var reportPtlogin = (function ()
  {
    var gbIsPTReport = false,
      gnPTTimer = setTimeout(function()
      {
        reportPtlogin(-1);
      }, 5000);
    return function(_anRet)
    {
      clearTimeout(gnPTTimer);

      if(!gbIsPTReport)
      {
        gbIsPTReport = true;

        var _oImg = document.createElement("img"),
          _sUserName = document.getElementById("u")&&encodeURIComponent(document.getElementById("u").value) || "",
          _sDomain = "https://rl.mail.qq.com" || "https://rl.mail.qq.com",
          _sStat = _sDomain + "/cgi-bin/getinvestigate?stat=loginerr&code=#code#&err=&un="+_sUserName+"&r="+Math.random();
        _sStat = _sStat.replace("#code#", ({"1":920,"0":921,"-1":922})[_anRet]);
        _oImg.src = _sStat;
        _oImg.style.display = "none";
        document.body.appendChild(_oImg);
        _oImg = null;
      }
    }
  })();
</script><img src="https://ssl.ptlogin2.qq.com/testimg" style="display:none" onload="reportPtlogin(1)" onerror="reportPtlogin(0)" /><div class="container"><div class="header"><a class="header_logo" href="/">QQ邮箱</a><div class="header_link"><a href="https://w.mail.qq.com/cgi-bin/loginpage?f=xhtml">基本版</a>&nbsp;|&nbsp;<a href="https://en.mail.qq.com">English</a>&nbsp;|&nbsp;<a href="https://app.mail.qq.com/" target="_blank">手机版</a>&nbsp;|&nbsp;<a href="https://exmail.qq.com?referrer=index_top" target="_blank">企业邮箱</a></div></div><div class="content"><div id="downError" class="login_msg" style="display:none;"><p><span class="login_msg_warning"></span>由于加载安全组件失败，为了您的帐号安全，无法正常登录邮箱，解决方法：</p><ul><li>按下F5重新刷新页面。</li><li>打开浏览器“选项”菜单，选择“Internet选项”，执行清空缓存功能，确定后按F5刷新本页面。</li><li>如上述方式仍然无法解决问题，请登录<a href="http://maildisk.bbs.qq.com" target="_blank">邮箱论坛通知我们</a>，我们将尽快为您解决。</li></ul></div><div class="content_wrapper"><div class="xm_login_container login_container" id="login">                 <div class="xm_login_card"><div class="xm_login_card_tab"><div class="xm_login_card_tab_item" id="wxLoginTab">微信登录</div><div class="xm_login_card_tab_item xm_login_card_tab_item_Active" id="qqLoginTab">QQ登录</div></div><div class="xm_login_card_cnt"><div class="xm_login_card_wx" id="wxLoginCard"><iframe id="login_wx_iframe" class="login_loginBox_wx_iframe" height="100%" width="100%"frameborder="no" scrolling="no" src="https://open.weixin.qq.com/connect/qrconnect?appid=wx5e893ac3cc590290&redirect_uri=https%3A%2F%2Fwx.mail.qq.com%2Flogin%2Flogin%3Fauth_type%3D1%26return_target%3D5%26delegate_url%3Dhttps%253A%252F%252Fmail.qq.com%252Fcgi-bin%252Freadtemplate%253Fcheck%253Dfalse%2526t%253Dloginpage_new_jump_for_xmail&self_redirect=false&response_type=code&scope=snsapi_login&state=state&href=https%3A%2F%2Fres.wx.qq.com%2Fa%2Fwebmail%2Fxmail%2Fres%2Fcss%2Fiframe_wx38793b.css#wechat_redirect"></iframe><div class="xm_login_card_state"><p id="auto_login" data-check="0"><a></a><span>下次自动登录</span></p></div></div><div class="xm_login_card_qq" id="qqLoginCard"><iframe id="login_frame" name="login_frame" height="100%" scrolling="no" width="100%" frameborder="0" test="jostinsu1"src="https://xui.ptlogin2.qq.com/cgi-bin/xlogin?target=self&appid=522005705&daid=4&s_url=https://mail.qq.com/cgi-bin/readtemplate?check=false%26t=loginpage_new_jump%26vt=passport%26vm=wpt%26ft=loginpage%26target=&style=25&low_login=1&proxy_url=https://mail.qq.com/proxy.html&need_qr=0&hide_border=1&border_radius=0&self_regurl=http://zc.qq.com/chs/index.html?type=1&app_id=11005?t=regist&pt_feedback_link=http://support.qq.com/discuss/350_1.shtml&css=https://res.mail.qq.com/zh_CN/htmledition/style/ptlogin_input_for_xmail51328e.css&pt_no_auth=1"></iframe></div></div></div><div class="login_box second_login_box" style="display:none;" ><div class="login_box_header"><h1 class="login_box_title">登录QQ邮箱</h1></div><div id="msgContainer" class="login_box_msg">您填写的帐号或密码不正确，请再次尝试。</div><noscript><div class="login_box_msg noScript">您的浏览器不支持或已经禁止网页脚本，您无法正常登录。<a href="/zh_CN/help/error_noscript.html" title="了解网页脚本限制的更多信息" target="_blank"><img src="https://rescdn.qqmail.com/zh_CN/htmledition/images/webp/ico_help1e9c5d.gif" style="margin:0 2px;" align="absmiddle" />如何解除脚本限制</a></div></noscript><div class="login_box_msg noCookie" id="infobarNoCookie" style="display:none">你的浏览器不支持或已经禁止使用Cookie，导致无法正常登录。请<a href="http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=7&&no=1001007#chrome" title="了解Cookie的更多信息" target="_blank">启用Cookie<img src="https://rescdn.qqmail.com/zh_CN/htmledition/images/webp/ico_help1e9c5d.gif" style="margin:0 2px;" align="absmiddle" /></a>后重试。</div><div style="display:none" id="qlogin" class="qlogin"></div><div class="login_operate" id="web_login"><form id="loginform" onsubmit="return QMLogin.checkInput();" method="post" name="loginform" target="_self" autocomplete="on"  ><div class="login_submit" style=""><input class="login_button" id="btlogin" name="btlogin" type="submit" value="登录" tabindex="5" /></div></form></div><a class="login_box_forgotpassword" href="https://aq.qq.com/cn2/findpsw/pc/pc_find_pwd_input_account?pw_type=6&aquin=&source_id=2705" target="_blank">忘了密码？</a><div style="display:none;" id="switch" class="lineright" onmouseup="QMLogin.switchMode()"></div></div></div><div class="login_pictures"><div class="login_pictures_picture" style="background-image:url('https://rescdn.qqmail.com/zh_CN/htmledition/images/webp/tg-chang1ea8a2.png');background-position:right 0;"></div> <div class="login_pictures_txt"><p class="login_pictures_title">QQ邮箱，常联系！</p><p>2500年前，人们飞鸽传书</p><p>184年前，莫尔斯发明了电报</p><p>51年前，第一封电子邮件发出</p><p>今天，QQ邮箱联系你、我、他</p></div>     </div></div></div><div class="footer"><a href="https://www.tencent.com" target="_blank">关于腾讯</a>&nbsp;|&nbsp;<a href="https://mail.qq.com/cgi-bin/readtemplate?check=false&t=mail_clause" target="_blank">服务条款</a>&nbsp;|&nbsp;<a href="https://privacy.qq.com/" target="_blank">隐私政策</a>&nbsp;|&nbsp;<a href="https://kf.qq.com/product/email.html" target="_blank">客服中心</a>&nbsp;|&nbsp;<a href="https://mail.qq.com/zh_CN/contact_us.html" target="_blank">联系我们</a>&nbsp;|&nbsp;<a href="https://service.mail.qq.com" target="_blank">帮助中心</a>&nbsp;|&nbsp;<span class="gray">&copy;1998 - 2020 Tencent Inc. All Rights Reserved.</span></div></div><script type="text/javascript">

  if (typeof window.postMessage !== 'undefined') {
    window.onmessage = function(event) {
      var msg = event || window.event; var data;
      if (typeof  JSON !== 'undefined') data = JSON.parse(msg.data);
      else
        data = str2JSON(msg.data);

      switch (data.action) {
        case 'close':
          ptlogin2_onClose();
          break;
        case 'resize':
          ptlogin2_onResize(data.width, data.height);
          break;
        default: break;
      }
    }
  }
  function str2JSON(str) {
    eval('var __pt_json='+str);
    return __pt_json;
  }
  function ptlogin2_onResize(width, height) {
    var login_wnd = document.getElementById("login");
    if (login_wnd)  {
      login_wnd.style.width  = width + "px";
      login_wnd.style.height = height + "px";
      login_wnd.style.visibility = "hidden";
      login_wnd.style.visibility = "visible";
    }
  }

  (function()
  {
    var _sLen = document.cookie.length,
      _nCookieNum = Math.random(),
      _sTestCookie = ["test", _nCookieNum, "test=test", ";expires=Thu, 01 Jan 9970 00:00:00 GMT",";path=/",";domain=.mail.qq.com"].join("");
    document.cookie = _sTestCookie;
    if (document.cookie.length == _sLen)
    {
      document.getElementById("infobarNoCookie").style.display = "";
    }
    _sTestCookie = ["test", _nCookieNum, "test=test", ";expires=Thu, 01 Jan 1970 00:00:00 GMT",";path=/",";domain=.mail.qq.com"].join("");
    document.cookie = _sTestCookie;
  })();
</script><script type="text/javascript">
  // 2018-12-25 为支持微信登录添加的逻辑 mark by jostinsu
  function ready(fn) {
    if(document.addEventListener) {
      document.addEventListener('DOMContentLoaded', function(){
        document.removeEventListener('DOMContentLoaded',arguments.callee,false);
        fn()
      },false)
    } else if(document.attachEvent){
      document.attachEvent('onreadystatechange',function(){
        if(document.readyState=='complete'){
          document.detachEvent('onreadystatechange',arguments.callee);
          fn()
        }
      })
    }
  }

  function getLoginTypeFromCookie(cb) {
    var cookies = document.cookie.split(';')
    for (var index=0; index<=cookies.length; index++) {
      var item = cookies[index]
      if (typeof item === 'string' && item.indexOf('qm_logintype') !== -1) {
        var cookie = item.split('=')
        if (cookie[1] && cookie[1] === 'wx') {
          cb('wx')
        } else {
          cb('qq')
        }
        break
      }
    }
  }

  function init(){
    document.domain = 'mail.qq.com'
    var wxLoginTab = document.getElementById('wxLoginTab')
    var qqLoginTab = document.getElementById('qqLoginTab')
    var wxLoginCard = document.getElementById('wxLoginCard')
    var qqLoginCard = document.getElementById('qqLoginCard')
// var wxLoginIframe = document.getElementById('wxLoginCard_iframe')

// 根据用户上次登录情况选择显示“微信登录”还是'QQ'登录
    getLoginTypeFromCookie(function(type){
      if (type === 'wx') {
        qqLoginCard.style.left = '-100%'
        clickWxLoginTab()
      } else {
        qqLoginCard.style.left = '0'
        clickQQLoginTab()
      }
    })

// 添加onload事件，待微信 iframe 样式加载回来再显示出来，不然会有闪烁
// if (wxLoginIframe.attachEvent){
//     wxLoginIframe.attachEvent("onload", hadLoadedWXIframe);
// } else {
//     wxLoginIframe.onload = hadLoadedWXIframe
// }
// setTimeout(function() { // 兜底的策略，在2s后必须显示微信登录框
//     hadLoadedWXIframe()
// }, 2000)
// function hadLoadedWXIframe() {
//     wxLoginIframe.style = ''
// }

// 'QQ登录'和‘微信登录’tab的切换事件
    wxLoginTab.onclick = clickWxLoginTab
    qqLoginTab.onclick = clickQQLoginTab
    function clickWxLoginTab() {
      if (wxLoginTab.className.indexOf('xm_login_card_tab_item_Active') === -1) {
        wxLoginTab.className += ' xm_login_card_tab_item_Active'
        qqLoginTab.className = qqLoginTab.className.replace(' xm_login_card_tab_item_Active', '')
        qqLoginCard.style.left = '-100%'
      }
    }
    function clickQQLoginTab() {
      if (qqLoginTab.className.indexOf('xm_login_card_tab_item_Active') === -1) {
        qqLoginTab.className += ' xm_login_card_tab_item_Active'
        wxLoginTab.className = wxLoginTab.className.replace(' xm_login_card_tab_item_Active', '')
        qqLoginCard.style.left = '0'
      }
    }
  }
  ready(init)

  // 2019-09-02 微信登录增加延长登录态逻辑
  ready(pendState)
  function pendState() {
    var target = document.getElementById('auto_login')
    var targetChild = document.getElementById('auto_login').getElementsByTagName('a')[0]
    if (document.addEventListener) {
      target.addEventListener('click', function() {
        if (target.getAttribute('data-check') == 1) {
          target.setAttribute('data-check', 0)
          targetChild.className = ''
          deletePendStateCookie(-1)
        } else {
          target.setAttribute('data-check', 1)
          targetChild.className = 'xm_login_card_checked'
          setPendStateCookie(1)
        }
      })
    } else {
      target.attachEvent('click', function() {
        target.addEventListener('click', function() {
          if (target.getAttribute('data-check') == 1) {
            target.setAttribute('data-check', 0)
            targetChild.className = ''
            deletePendStateCookie(-1)
          } else {
            target.setAttribute('data-check', 1)
            targetChild.className = 'xm_login_card_checked'
            setPendStateCookie(1)
          }
        })
      })
    }
  }
  function setPendStateCookie(day) {
    var date = new Date()
    date.setTime(date.getTime() + day * 24 * 60 * 60 * 1000)
    var expires = '; expires=' + date.toGMTString()
    document.cookie = 'xm_pstate' + '=' + true + expires + '; path=/; domain=.mail.qq.com'
  }
  // 初始化进入页面 删除cookie
  ready(deletePendStateCookie)
  function deletePendStateCookie() {
    setPendStateCookie(-1)
  }
</script></body></html>

